#include "lidar.h"

void Lidar::setModel(const std::string& model) {
    this->model = model;
}

void Lidar::setChannels(int channels) {
    this->channels = channels;
}

void Lidar::setRange(const std::string& range) {
    this->range = range;
}

void Lidar::setPower(const std::string& power) {
    this->power = power;
}

void Lidar::print() const {
    std::cout << "激光雷达型号: " << model << std::endl;
    std::cout << "通道数: " << channels << std::endl;
    std::cout << "测距范围: " << range << std::endl;
    std::cout << "功率: " << power << std::endl;
}

void Lidar::save(std::ofstream& out) const {
    out << "激光雷达型号: " << model << std::endl;
    out << "通道数: " << channels << std::endl;
    out << "测距范围: " << range << std::endl;
    out << "功率: " << power << std::endl;
}